Range

Function

This API is used to set parameter for Custom > Cloud(new) page.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/StorageConfig/Server/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1
ParameterRangeTypeDescription
accesstoken1-128stringToken after Dropbox activation
Table 2
ParameterRangeTypeDescription
enc_modeFTP
SFTP
AWS S3
DROPBOX
Google Drive
stringServer mode (DVR/NVR dedicated)
video_stream_typeMainstream
Substream
stringVideo stream type (dedicated to DVR/NVR)
video_typeMP4
RF
stringVideo file type (DVR/NVR specific)
max_package_interval10 30 60 180 300 600IntMaximum subcontracting interval Second (DVR/NVR exclusive)
cloud_statusActivated
CloudFull
Unactivated
NetworkBlocked
Disabled
stringCloud storage connection status (DVR/NVR only) Note: only access is allowed, and setting is not supported
total_sizeUnit: Bytesunsigned
long
long
Total capacity (DVR/NVR dedicated) Note: Only allowed for acquisition, not supported for setting
used_sizeUnit: Bytesunsigned
long
long
Used capacity (DVR/NVR dedicated) Note: Only allowed to obtain, not supported for setting
cloud_over_writeOff
Auto
1Day
3Days
7Days
14Days
30Days
90Days
stringCloud storage data overwrite time (DVR/NVR dedicated)
progress[0~100]intCapacity usage percentage of Cloud storage (DVR/NVR only) Note: only access is allowed, and setting is not supported
enc_agreement"ftp://"
"sftp://"
"https://"
stringProtocol before IP
Total capacity (DVR/NVR dedicated)
Note: Only allowed to obtain, not supported to set
server_ipMax length: 255 bytestringIP address (DVR/NVR dedicated)
port[1~65535]intServer Port
usernameMax length: 255 bytestringLogin username
passwordMax length: 255 bytestringLogin password
password_emptyboolIs the password empty
region[0~31]stringRegion (DVR/NVR exclusive)
enableboolEnabling the server (DVR/NVR dedicated)
testboolDoes it support TEST (DVR/NVR dedicated)
activate_cloud_btnboolDoes it support activation button (dedicated to DVR/NVR)
show_server_contentenable
test
port
password
password_empty
video_stream_type
server_ip
video_type
max_package_interval
enc_agreement
region
activate_cloud_btn
cloud_status
total_size
used_size
progress
cloud_over_write
stringTell the remote corresponding mode which controls should be displayed
Table 3
ParameterRangeTypeDescription
cloud_typeDROPBOX
Google Drive
stringCloud storage type
Table 4
ParameterRangeTypeDescription
urlstringRequest Connection URL
codestringVerification code (for Google Drive Cloud storage)

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "enc_mode": {
            "type": "string",
            "items": [
                "FTP",
                "SFTP",
                "AWS S3",
                "DROPBOX",
                "Google Drive",
                "AI Cloud"
            ]
        },
        "enc_agreement": {
            "type": "string",
            "items": [
                "ftp: //",
                "sftp: //",
                "https: //"
            ]
        },
        "video_stream_type": {
            "type": "string",
            "items": [
                "Substream"
            ]
        },
        "video_type": {
            "type": "string",
            "items": [
                "MP4",
                "RF",
                "H.264/H.265/MJPEG"
            ]
        },
        "max_package_interval": {
            "type": "int32",
            "unit": "second",
            "items": [
                10,
                30,
                60,
                180,
                300,
                600
            ]
        },
        "cloud_status": {
            "type": "string",
            "items": [
                "Activated",
                "CloudFull",
                "Unactivated",
                "NetworkBlocked",
                "Disabled"
            ]
        },
        "total_size": {
            "type": "string",
            "min_len": 0,
            "max_len": 20
        },
        "used_size": {
            "type": "string",
            "min_len": 0,
            "max_len": 20
        },
        "progress": {
            "type": "int32",
            "min": 0,
            "max": 100
        },
        "cloud_over_write": {
            "type": "string",
            "items": [
                "OFF",
                "Auto",
                "1Day",
                "3Days",
                "7Days",
                "14Days",
                "30Days",
                "90Days"
            ]
        },
        "mutual_exclusion_rule": {
            "type": "string",
            "items": [
                "cloud",
                "all"
            ]
        },
        "ftp_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "server_ip": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 255
                        },
                        {
                            "min_len": 1,
                            "max_len": 255
                        }
                    ]
                },
                "port": {
                    "type": "int32",
                    "mode": "r",
                    "min": 1,
                    "max": 65535,
                    "default_value": 21
                },
                "username": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password_empty": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "test",
                        "port",
                        "password",
                        "password_empty",
                        "video_stream_type",
                        "server_ip",
                        "video_type",
                        "max_package_interval",
                        "enc_agreement"
                    ]
                }
            }
        },
        "sftp_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "server_ip": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 255
                        },
                        {
                            "min_len": 1,
                            "max_len": 255
                        }
                    ]
                },
                "port": {
                    "type": "int32",
                    "mode": "r",
                    "min": 1,
                    "max": 65535,
                    "default_value": 22
                },
                "username": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password_empty": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "test",
                        "port",
                        "password",
                        "password_empty",
                        "video_stream_type",
                        "server_ip",
                        "video_type",
                        "max_package_interval",
                        "enc_agreement"
                    ]
                }
            }
        },
        "aws_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "server_ip": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 255
                        },
                        {
                            "min_len": 1,
                            "max_len": 255
                        }
                    ]
                },
                "region": {
                    "type": "string",
                    "items": [
                        "us-east-2/",
                        "us-east-1/",
                        "us-west-1/",
                        "us-west-2/",
                        "af-south-1/",
                        "ap-east-1/",
                        "ap-southeast-3/",
                        "ap-south-1/",
                        "ap-northeast-3/",
                        "ap-northeast-2/",
                        "ap-southeast-1/",
                        "ap-southeast-2/",
                        "ap-northeast-1/",
                        "ca-central-1/",
                        "eu-central-1/",
                        "eu-west-1/",
                        "eu-west-2/",
                        "eu-south-1/",
                        "eu-west-3/",
                        "eu-north-1/",
                        "me-south-1/",
                        "me-central-1/",
                        "sa-east-1/"
                    ]
                },
                "storage_class": {
                    "type": "string",
                    "items": [
                        "STANDARD",
                        "STANDARD_IA",
                        "ONEZONE_IA",
                        "INTELLIGENT_TIERING",
                        "GLACIER",
                        "DEEP_ARCHIVE",
                        "REDUCED_REDUNDANCY"
                    ]
                },
                "username": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password": {
                    "description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 63
                        },
                        {
                            "min_len": 1,
                            "max_len": 63
                        }
                    ]
                },
                "password_empty": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "test",
                        "region",
                        "password",
                        "password_empty",
                        "video_stream_type",
                        "server_ip",
                        "video_type",
                        "max_package_interval",
                        "enc_agreement"
                    ]
                }
            }
        },
        "dropbox_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "activate_cloud_btn",
                        "video_stream_type",
                        "video_type",
                        "max_package_interval",
                        "cloud_status",
                        "total_size",
                        "used_size",
                        "progress",
                        "cloud_over_write"
                    ]
                }
            }
        },
        "google_drive_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "activate_cloud_btn",
                        "video_stream_type",
                        "video_type",
                        "max_package_interval",
                        "cloud_status",
                        "total_size",
                        "used_size",
                        "progress",
                        "cloud_over_write"
                    ]
                }
            }
        },
        "AICloud_info": {
            "type": "object",
            "items": {
                "enable": {
                    "type": "bool"
                },
                "show_server_content": {
                    "type": "string",
                    "items": [
                        "enable",
                        "video_stream_type",
                        "video_type",
                        "max_package_interval"
                    ]
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.